﻿@model IEnumerable<sgp.Models.PessoaFisica>
@{
    ViewBag.Title = "Index";
}



<legend>
    <table border="0" width="100%" cellpadding="5">
        <tr>
            <td>
                <h2>
                    Pessoas Cadastradas</h2>
            </td>
        </tr>
        <tr>
            <td>
                <a class="btn btn-primary btn-primary pull-left" href="/PessoaFisica/Create" data-original-title="">
                    Adicionar</a>
            </td>
        </tr>
    </table>
</legend>
<table>
    @using (Html.BeginForm())
    {
        <tr>
            <td>
               <div>
                    @Html.DropDownList("tipoDoadorId", new SelectList(ViewBag.TipoDoador, "Id", "Nome"), "Todos")   
                    <input class="btn btn-info" type="submit" value="Filtrar" />                 
               </div>
            </td>            
        </tr>
    }
</table>
<table class="table table-bordered table-striped" width="100%" cellspacing="0" cellpadding="0"
    border="0">
    <tr>
        <th>
            Nome
        </th>
        <th>
            Email
        </th>
        <th>
            Paroquia/Comunidade
        </th>
        <th>
            Tipo de Doador
        </th>
        <th>
            Telefone
        </th>
        <th>
            Ações
        </th>
    </tr>
    @foreach (var item in Model)
    {
    
    
        <tr>
            <td>
                <div>
                    @Html.DisplayFor(modelItem => item.Nome)
                </div>
            </td>
            <td>
                <div>
                    @Html.DisplayFor(modelItem => item.Email)
                </div>
            </td>
            <td>
                <div>
                    @Html.DisplayFor(modelItem => item.Setor.Nome)
                </div>
            </td>
            <td>
                <div>
                    @Html.DisplayFor(modelItem => item.TipoDoador.Nome)
                </div>
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Telefone)
            </td>
            <td>
                <a class="btn" href="/PessoaFisica/Edit/@item.Id" data-original-title="Editar"><i
                    class="icon-edit"></i></a><a class="btn" href="/PessoaFisica/Details/@item.Id" data-original-title="Detalhar">
                        <i class="icon-file"></i></a><a class="btn btn-danger" href="/PessoaFisica/Delete/@item.Id" data-original-title="Deletar">
                            <i class="icon-remove icon-white"></i></a>
            </td>
        </tr>
    }
</table>
